home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
ASSEMBLE
/
H055.ZIP
/
DEMO
/
INS0156.ALC
< prev
next >
Wrap
Text File
|
1987-06-06
|
3KB
|
93 lines
TITLE 'INS0156 - PC/370 MVS SIO TYPE 4 MACRO INSTRUCTION'
* PGMID. INS0156.ALC (LINKED AS INS0156.MOD)
* AUTHOR. DON HIGGINS.
* DATE. 05/31/87
* REMARKS. PC/370 MVS SIO (START I/O) TYPE 4 MACRO INSTRUCTION TO
* SUPPORT SIMULATED CAHNNEL PROGRAMS TO CONSOLE X'01F'
* MAINTENANCE.
*
* 06/02/87 ADD TIC AND DEVICE END LOGIC
* 06/06/87 ADD CR,LF AFTER READ
*
INS0156 CSECT
USING *,R6
L R3,OLDPGM+4
CLC 0(4,R3),=X'9C00001F' IF NOT EXPLICIT X'01F'
BNE NOTOPER SET CC=3 = NOT OPERATIONAL
L R3,CAW
CCWEXEC EQU * EXEC CCW AT R3
CLI 0(R3),CCREAD
BE INSREAD
CLI 0(R3),CCWRITE
BE INSWRITE
CLI 0(R3),CCTIC
BE INSTIC
CCWERR EQU * CCW INVALID OP CODE
MVC CSW+4,=X'0C20' CE, DE, PGM CHECK
LH R0,6(R3)
STH R0,CSW+6 CCW RESIDUAL COUNT
B CSWSTOR
INSREAD EQU * CCW READ VIA ASSIST XREAD
L R4,0(R3)
LH R5,6(R3)
XREAD 0(R4),0(R5)
LA R2,LF
SVC WRITECHR FORCE LF,CR AFTER READ
LA R2,CR
SVC WRITECHR
MVC CSW+4(4),=X'0C000000'
BZ CCWNEXT
MVC CSW+4(2),=X'0D00' CCW CE, DE, UNIT EXCEPTION
LH R0,6(R3)
STH R0,CSW+6
B CSWSTOR
INSWRITE EQU * CCW WRITE VIA ASSIST XPRNT
L R4,0(R3)
LH R5,6(R3)
XPRNT 0(R4),0(R5)
MVC CSW+4(4),=X'0C000000'
B CCWNEXT
INSTIC EQU * CCW TRANSFER TO CCW
L R3,0(R3)
B CCWEXEC
CCWNEXT EQU *
TM 4(R3),X'40' IS CHAIN COMMAND ON
BZ CSWSTOR NO, STORE CSW AND EXIT
LA R3,8(R3) YES, GO TO NEXT CCW
B CCWEXEC
NOTOPER EQU *
OI OLDPGM+2,X'30' SET CC=3
B INSEXT
CSWSTOR EQU *
NI OLDPGM+2,X'CF' SET CC=0 STARTED
OI OLDPGM+2,X'10' SET CC=1 CSW STORED
ST R3,CSW CCW ADDRESS
INSEXT EQU *
L R15,OLDPGM+4
LA R15,4(R15) SKIP OVER SIO INSTR.
ST R15,OLDPGM+4
SR R15,R15
BR R14
*
* DATA
*
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R14 EQU 14
R15 EQU 15
OLDPGM EQU X'28' OLD PGM PSW
CSW EQU X'40' CHANNEL STATUS WORD
CAW EQU X'48' CHANNEL ADDRESS WORD
CCREAD EQU X'02' CCW READ
CCWRITE EQU X'01' CCW WRITE
CCTIC EQU X'08' CCW TIC
WRITECHR EQU 200+2 WRITE CHR TO CONSOLE FROM R2
CR EQU X'0D' ASCII CARRIAGE RETURN
LF EQU X'0A' ASCII LINE FEED
END